﻿Imports System.Text.RegularExpressions

Public Class Validador
    Public Shared Function IsValidEmail(ByVal text As String) As Boolean
        Return Regex.IsMatch(text, _
                "^([\w-]+\.)*?[\w-]+@[\w-]+\.([\w-]+\.)*?[\w]+$")
    End Function

    Public Shared Function IsOnlyText(ByVal text As String) As Boolean
        Return Regex.IsMatch(text, "^[\w -[0-9]]+$")
    End Function

    Public Shared Function IsOnlyNumber(ByVal text As String) As Boolean
        Return Regex.IsMatch(text, "^\d+$")
    End Function
End Class
